home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / xinetd.2 / xinetd / xinetd.2.1.7-linux.4 / libs / src / pq / hpqimpl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-25  |  785 b   |  34 lines

  1. /*
  2.  * (c) Copyright 1993 by Panagiotis Tsirigotis
  3.  * All rights reserved.  The file named COPYRIGHT specifies the terms 
  4.  * and conditions for redistribution.
  5.  */
  6.  
  7. /*
  8.  * $Id: hpqimpl.h,v 1.1 1992/11/23 16:25:25 panos Exp $
  9.  */
  10.  
  11. #include "hpq.h"
  12.  
  13. typedef struct __hpq_header header_s ;
  14.  
  15. #define HHP( p )            ((header_s *)p)
  16.  
  17. #define HANDLE_ERROR( flags, retval, errp, errval, msg )        \
  18.                 if ( flags & PQ_RETURN_ERROR )                        \
  19.                 {                                                                \
  20.                     *errp = errval ;                                        \
  21.                     return( retval ) ;                                    \
  22.                 }                                                                \
  23.                 else                                                            \
  24.                 {                                                                \
  25.                     char *s = msg ;                                        \
  26.                                                                                 \
  27.                     (void) write( 2, s, strlen( s ) ) ;                \
  28.                     abort() ;                                                \
  29.                     _exit( 1 ) ;                                             \
  30.                     /* NOTREACHED */                                        \
  31.                 }
  32.  
  33.  
  34.